package edu.xlh.travel.controller.admin;

import edu.xlh.travel.common.Result;
import edu.xlh.travel.service.WeatherService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/weather")
public class WeatherController {
    @Autowired
    private WeatherService weatherService;
    /**
     * 获取天气
     * @return null
     * @throws Exception
     */
    @GetMapping("/weather/getWeather")
    @ApiOperation("获取天气-赣州")
    public Result getWeather() throws Exception {
        return weatherService.getWeather();
    }
}
